package com.etong.citymap.activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;

import com.etong.citymap.db.util.CityApplication;
import com.etong.citymap.util.ActivityUtil;

/**
 * 欢迎界面
 */
public class WelcomeActivity extends Activity {
	Handler handler=new Handler();
	private CityApplication cityApplication;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		cityApplication = (CityApplication)getApplication();
		super.onCreate(savedInstanceState);

		setContentView(R.layout.welcome);
		handler.postDelayed(new Runnable() {
			
			@Override
			public void run() {
				ActivityUtil.ToActivity(WelcomeActivity.this, LoginActivity.class);
				finish();
				
			}
		},cityApplication.WelocmeTimeoutTime);
	}
}
